package com.tiancheng.trade.order.convert;

import com.tiancheng.trade.order.model.Order;
import com.tiancheng.trade.order.model.SubOrder;
import com.tiancheng.trade.order.vo.open.order.OpenCreateOrderResVO;
import com.tiancheng.trade.order.vo.open.order.OpenCreateSubOrderResVO;
import com.tiancheng.trade.order.vo.open.order.OpenQueryOrderInfoResVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author: kellen
 * @Description: 订单信息转换
 * @Date: create in 2024/11/28 15:46
 */
@Mapper(componentModel = "spring")
public interface OrderConvert {
    OrderConvert INSTANCE = Mappers.getMapper(OrderConvert.class);

    OpenCreateOrderResVO getOpenCreateOrderResVO(Order order);

    OpenCreateSubOrderResVO getOpenCreateSubOrderResVO(SubOrder subOrder);

    List<OpenCreateSubOrderResVO> getOpenCreateSubOrderResVOs(List<SubOrder> subOrders);

    OpenQueryOrderInfoResVo order2OpenQueryOrderInfoResVo(Order order);
}
